package com.core.bean;


/**
 * 袁
 * sku商品表
 */

public class Goods {
    /**
     * 商品id
     */
    private String id;
    /**
     * SPU产品id
     */
    private String pid;
    /**
     * SKU商品价格
     */
    private String price;
    /**
     * 规格
     */
    private Property property;

    private String propertyz;
    /**
     * 商品状态  0停用  1正常
     */
    private Integer status;
    /**
     * 产品类
     */
    private Product product;

    public Goods() {
    }

    public Goods(String id, String pid, String price, Property property, String propertyz, Integer status, Product product) {
        this.id = id;
        this.pid = pid;
        this.price = price;
        this.property = property;
        this.propertyz = propertyz;
        this.status = status;
        this.product = product;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public Property getProperty() {
        return property;
    }

    public void setProperty(Property property) {
        this.property = property;
    }

    public String getPropertyz(String p) {
        return propertyz;
    }

    public void setPropertyz(String propertyz) {
        this.propertyz = propertyz;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    @Override
    public String toString() {
        return "Goods{" +
                "id='" + id + '\'' +
                ", pid='" + pid + '\'' +
                ", price='" + price + '\'' +
                ", property=" + property +
                ", propertyz='" + propertyz + '\'' +
                ", status=" + status +
                ", product=" + product +
                '}';
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof Goods && null!=getId()){
           return getId().equals(((Goods)obj).getId());
        }
        return false;
    }
}
